<?xml version="1.0" encoding="UTF-8"?>
<Worksheet>
<Version major="17" minor="0"/>
<Label-Scheme value="2" prefix=""/>
<View-Properties presentation="true" autoexpanding_sections="true"><Zoom percentage="150"/>
</View-Properties>
<MapleNet-Properties elisiondigitsbefore="100" labelling="true" indentamount="4" elisiontermsthreshold="10000" ansi="false" errorbreak="1" useclientjvm="true" echo="1" imaginaryunit="I" labelwidth="20" contextmenusize="automatic" plotdriver="opengl" elisiondigitsafter="100" plotoutput="terminal" helpbrowser="standard" rtablesize="10" elisiontermsbefore="100" elisiondigitsthreshold="10000" typesetting="standard" plotdevice="inline" verboseproc="1" showassumed="1" errorcursor="false" longdelim="true" plotoptions="" quiet="false" elisiontermsafter="100" screenwidth="79" preplot="" prettyprint="3" displayprecision="-1" screenpixelheight="1080" warnlevel="3" screenheight="25" latexwidth="8.0" postplot="" prompt="&gt; " ShowLabels="true"/>
<Styles>
<Font name="Ordered List 1" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Annotation Text" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Ordered List 2" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Ordered List 3" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Ordered List 4" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Ordered List 5" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Author" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Annotation Title" background="[255,255,255]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="18" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Warning" background="[255,255,255]" bold="false" executable="false" family="Courier New" foreground="[0,0,255]" italic="false" opaque="false" readonly="true" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Caption Reference" background="[255,255,255]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Maple Input Placeholder" background="[255,255,255]" bold="true" executable="true" family="Courier New" foreground="[200,0,200]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="true"/>
<Font name="Maple Plot" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Code" background="[255,255,255]" bold="false" executable="false" family="Courier New" foreground="[255,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Line Printed Output" background="[255,255,255]" bold="false" executable="false" family="Courier New" foreground="[0,0,255]" italic="false" opaque="false" readonly="true" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Text Output" background="[255,255,255]" bold="false" executable="false" family="Courier New" foreground="[0,0,255]" italic="false" opaque="false" readonly="true" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Diagnostic" background="[255,255,255]" bold="false" executable="false" family="Courier New" foreground="[40,120,40]" italic="false" opaque="false" readonly="true" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="2D Inert Output" background="[255,255,255]" bold="false" executable="true" family="Times New Roman" foreground="[144,144,144]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Normal" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Hyperlink" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,128,128]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="true" placeholder="false"/>
<Font name="Maple Output" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Dash Item" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="2D Math" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Maple Input" background="[255,255,255]" bold="true" executable="true" family="Courier New" foreground="[120,0,14]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="2D Output" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,255]" italic="false" opaque="false" readonly="true" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="2D Input" background="[255,255,255]" bold="false" executable="true" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="HyperlinkError" background="[255,255,255]" bold="false" executable="false" family="Courier New" foreground="[255,0,255]" italic="false" opaque="false" readonly="true" size="12" subscript="false" superscript="false" underline="true" placeholder="false"/>
<Font name="Header and Footer" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="10" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Error" background="[255,255,255]" bold="false" executable="false" family="Courier New" foreground="[255,0,255]" italic="false" opaque="false" readonly="true" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Title" background="[255,255,255]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="18" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Heading 1" background="[255,255,255]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="18" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Text" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Bullet Item" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Heading 4" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="true" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Equation Label" background="[255,255,255]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Heading 3" background="[255,255,255]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="true" opaque="false" readonly="false" size="14" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Heading 2" background="[255,255,255]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="16" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="HyperlinkWarning" background="[255,255,255]" bold="false" executable="false" family="Courier New" foreground="[0,0,255]" italic="false" opaque="false" readonly="true" size="12" subscript="false" superscript="false" underline="true" placeholder="false"/>
<Font name="Dictionary Hyperlink" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[147,0,15]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="true" placeholder="false"/>
<Font name="Atomic Variable" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[175,0,175]" italic="true" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Caption Text" background="[255,255,255]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="List Item" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Layout name="Ordered List 1" alignment="left" bullet="numeric" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="3" spacebelow="3" linebreak="space" pagebreak-before="false" initial="-1" bulletsuffix=""/>
<Layout name="Ordered List 2" alignment="left" bullet="alphabetic" firstindent="0" leftmargin="36" rightmargin="0" linespacing="0.0" spaceabove="3" spacebelow="3" linebreak="space" pagebreak-before="false" initial="-1" bulletsuffix=""/>
<Layout name="Ordered List 3" alignment="left" bullet="roman" firstindent="0" leftmargin="72" rightmargin="0" linespacing="0.0" spaceabove="3" spacebelow="3" linebreak="space" pagebreak-before="false" initial="-1" bulletsuffix=""/>
<Layout name="Ordered List 4" alignment="left" bullet="ALPHABETIC" firstindent="0" leftmargin="108" rightmargin="0" linespacing="0.0" spaceabove="3" spacebelow="3" linebreak="space" pagebreak-before="false" initial="-1" bulletsuffix=""/>
<Layout name="Ordered List 5" alignment="left" bullet="ROMAN" firstindent="0" leftmargin="144" rightmargin="0" linespacing="0.0" spaceabove="3" spacebelow="3" linebreak="space" pagebreak-before="false" initial="-1" bulletsuffix=""/>
<Layout name="Author" alignment="centred" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="8" spacebelow="8" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Warning" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Annotation Title" alignment="centred" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="12" spacebelow="12" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Maple Plot" alignment="centred" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Line Printed Output" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="any" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Text Output" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="newline" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Diagnostic" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="any" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Normal" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Maple Output" alignment="centred" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.3" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Dash Item" alignment="left" bullet="dash" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="3" spacebelow="3" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="HyperlinkError" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Error" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Title" alignment="centred" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="12" spacebelow="12" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Heading 1" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="8" spacebelow="4" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Bullet Item" alignment="left" bullet="dot" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="3" spacebelow="3" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Heading 4" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Heading 3" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Heading 2" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="8" spacebelow="2" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="HyperlinkWarning" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="List Item" alignment="left" bullet="indent" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="3" spacebelow="3" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Pencil-style name="Pencil 5" pen-color="[255,0,0]" pen-height="5.0" pen-width="5.0" pen-opacity="1.0"/>
<Pencil-style name="Pencil 4" pen-color="[0,0,255]" pen-height="3.0" pen-width="3.0" pen-opacity="1.0"/>
<Pencil-style name="Pencil 3" pen-color="[0,0,0]" pen-height="3.0" pen-width="3.0" pen-opacity="1.0"/>
<Pencil-style name="Pencil 2" pen-color="[0,0,255]" pen-height="1.0" pen-width="1.0" pen-opacity="1.0"/>
<Pencil-style name="Pencil 1" pen-color="[0,0,0]" pen-height="1.0" pen-width="1.0" pen-opacity="1.0"/>
<Highlighter-style name="Highlighter 2" pen-color="[255,204,0]" pen-height="14.0" pen-width="14.0" pen-opacity="0.8"/>
<Highlighter-style name="Highlighter 1" pen-color="[255,153,255]" pen-height="12.0" pen-width="8.0" pen-opacity="0.8"/>
<Highlighter-style name="Highlighter 4" pen-color="[0,255,255]" pen-height="32.0" pen-width="32.0" pen-opacity="0.8"/>
<Highlighter-style name="Highlighter 3" pen-color="[51,255,0]" pen-height="24.0" pen-width="24.0" pen-opacity="0.8"/>
<Highlighter-style name="Highlighter 5" pen-color="[255,255,0]" pen-height="48.0" pen-width="48.0" pen-opacity="0.8"/>
</Styles>
<Task-table>
    <Task-category name="&lt;default&gt;"/>
</Task-table>
<Task/><Presentation-Block>
<Group view="code" labelreference="L11" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">Digits := 80:
with(Groebner):

read(&quot;models.txt&quot;):
filtered := [op(models)]:
nops(models);</Text-field>
</Input>
<Output>
<Text-field style="2D Output" layout="Maple Output"><Equation executable="false" style="2D Output">IiYkKUci</Equation></Text-field>
</Output>
</Group></Presentation-Block>
<Section collapsed="true" MultipleChoiceAnswerIndex="-1" MultipleChoiceRandomizeChoices="false" TrueFalseAnswerIndex="-1" EssayAnswerRows="5" EssayAnswerColumns="60"><Title>
<Text-field style="Heading 1" layout="Heading 1">Code to find numerical solutions of bivariate zero dimensional system</Text-field></Title><Presentation-Block>
<Group view="presentation" hide-input="false" hide-output="true" inline-output="false" labelreference="L749" drawlabel="true">
</Group></Presentation-Block><Presentation-Block>
<Group view="presentation" hide-input="false" hide-output="true" inline-output="false" labelreference="L748" drawlabel="true">
</Group></Presentation-Block>
<Group labelreference="L737" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">eqf := proc(a,b) 
  if not (type(a,numeric) and type(b,numeric)) then return false: fi:
  return evalb(abs(a-b)&lt;0.0001): 
end:

inf := proc(a,S) return `or`(op(map(eqf,S,a))); end:
iszer := proc(a) if eqf(a,0) then return 0 else return a: fi: end:

zerpol := proc(p) local cfs,xs,t;
  cfs := [coeffs(p,x,'t')]:
  xs := [t]:
  return add(iszer(cfs[k])*xs[k],k=1..nops(cfs));
end:

fsolvesys := proc(G) local pts,k,ys,j,tp,xs;
 ys := {fsolve(op(remove(has,G,x)))};
 pts := {}:

 for k in ys do
   xs := map(a-&gt;{fsolve(a)},remove(a-&gt;a=0,map(zerpol,subs(y=k,G))));
   tp := xs[1];
   for j in xs[2..-1] do
     tp := select(inf,tp,j):
   od:

   pts := pts union {seq([j,k],j=tp)}:
 od:
end:</Text-field>
</Input>
</Group><Presentation-Block>
<Group view="presentation" hide-input="false" hide-output="true" inline-output="false" labelreference="L736" drawlabel="true">
<Input>
<Text-field style="Text" layout="Normal"><Equation executable="false" style="2D Math" input-equation="" display="LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYkLUkjbWlHRiQ2I1EhRicvJSxtYXRodmFyaWFudEdRJ25vcm1hbEYn">LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYkLUkjbWlHRiQ2I1EhRicvJSxtYXRodmFyaWFudEdRJ25vcm1hbEYn</Equation></Text-field>
</Input>
</Group></Presentation-Block>
</Section>
<Section collapsed="true" MultipleChoiceAnswerIndex="-1" MultipleChoiceRandomizeChoices="false" TrueFalseAnswerIndex="-1" EssayAnswerRows="5" EssayAnswerColumns="60"><Title>
<Text-field style="Heading 1" layout="Heading 1">Find Min Polys of alpha</Text-field></Title><Presentation-Block>
<Group view="code" labelreference="L63" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">minPs := proc(S)
  local alpha,cycPol,chi,chi_x,chi_y,i,k,pos,GB0,GBc,ys,xs,c,p,check,mP,mC,G,Q,Qpol,P,sls,t,u;

  # Define characteristic polynomial of S
  chi := add(x^k[1]*y^k[2],k=S):

  # Compute partials and their numerators
  chi_x := numer(normal(diff(chi,x)));
  chi_y := numer(normal(diff(chi,y)));

  GB0 := remove(has,Basis([chi_x,chi_y,1-u*x*y],plex(u,x,y)),u):
  sls := select(a-&gt;(a[1]&gt;0) and (a[2]&gt;0), fsolvesys(GB0)):

  if nops(sls)&gt;1 then error &quot;Multiple positive solutions&quot;: fi:
  if nops(sls)=0 then error &quot;No positive solution!&quot; fi:

  pos := {x=sls[1][1],y=sls[1][2]}:
  p := subs(op(pos),chi);

  # Get minimal poly of p 
  G := Basis([chi_x,chi_y,numer(t-chi),u*x*y-1],lexdeg([u,x,y],[t])):
  mP := factor(op(remove(has,G,{x,y,u}))):

  # Find the min factor and check it annihilates p
  check := 0:
  if not irreduc(mP) then 
    check := -1:
    for i in factor(mP) do
      if abs(subs(t=p,i))&lt;0.00001 then check := 0: mP := i: break: fi:
    od:
  fi:
  if check=-1 then error &quot;Can't find min poly of mP&quot; fi:

  Q := simplify(  diff(chi,x,y) / sqrt(diff(chi,x,x)*diff(chi,y,y))  ):
  Qpol := simplify(  diff(chi,x,y)^2 / (diff(chi,x,x)*diff(chi,y,y))  ):
  P := numer(t^2-Qpol):
  c := evalf(subs(op(pos),Q)):

  GBc:=Groebner[Basis]([chi_x,chi_y,P,1-u*x*y*denom(Qpol)],lexdeg([x,y,u],[t])):
  mC:=factor(op(remove(has,GBc,{x,y,u})));

  # Find the min factor and check it annihilates c
  check := 0:
  if not irreduc(mC) then 
    check := -1:
    for i in factor(mC) do
      if abs(subs(t=c,i))&lt;0.00001 then check := 0: mC := i: break: fi: 
    od:
  fi:
  if check=-1 then error &quot;Can't find min poly of c&quot; fi:

 # Find alpha
 alpha := evalf(-1-Pi/arccos(-c));

 cycPol := expand(x^degree(mC,t)*subs(t=(x^2+1)/(2*x),mC)):
 cycPol := mul(k[1],k=sqrfree(cycPol)[2]);
 
 if not irreduc(cycPol) then error &quot;R(x) not irreducible&quot;: fi;
 return [p,primpart(mP),c,primpart(mC),alpha,primpart(cycPol)];
end:</Text-field>
</Input>
</Group></Presentation-Block>
</Section><Presentation-Block>
<Group view="code" labelreference="L740" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
</Input>
</Group>
<Group labelreference="L46" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"># Takes a long time to run the code (1 - 2 hours)
# We read in the results instead

read &quot;allPols.txt&quot;:
nops(allPols);

#for k from 1 to 12883 do
#  PP[k] := minPs(models[k])[6];
#od:</Text-field>
</Input>
<Output>
<Text-field style="2D Output" layout="Maple Output"><Equation executable="false" style="2D Output">IiYkKUci</Equation></Text-field>
</Output>
</Group></Presentation-Block><Presentation-Block>
<Group view="code" labelreference="L799" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">allPols[123];
minPs(models[123])[6];</Text-field>
</Input>
<Output>
<Text-field style="2D Output" layout="Maple Output"><Equation executable="false" style="2D Output" display="LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzY4LUYjNiYtSSNtbkdGJDYkUSMxN0YnLyUsbWF0aHZhcmlhbnRHUSdub3JtYWxGJy1JI21vR0YkNi1RMSZJbnZpc2libGVUaW1lcztGJ0YxLyUmZmVuY2VHUSZmYWxzZUYnLyUqc2VwYXJhdG9yR0Y6LyUpc3RyZXRjaHlHRjovJSpzeW1tZXRyaWNHRjovJShsYXJnZW9wR0Y6LyUubW92YWJsZWxpbWl0c0dGOi8lJ2FjY2VudEdGOi8lJ2xzcGFjZUdRJjAuMGVtRicvJSdyc3BhY2VHRkktSSVtc3VwR0YkNiUtSSNtaUdGJDYlUSJ4RicvJSdpdGFsaWNHUSV0cnVlRicvRjJRJ2l0YWxpY0YnLUYuNiRRIzIwRidGMS8lMXN1cGVyc2NyaXB0c2hpZnRHUSIwRidGMS1GNTYtUSIrRidGMUY4RjtGPUY/RkFGQ0ZFL0ZIUSwwLjIyMjIyMjJlbUYnL0ZLRlxvLUYjNiYtRi42JFEkNjM0RidGMUY0LUZNNiVGTy1GLjYkUSMxOEYnRjFGZW5GMUZobi1GIzYmLUYuNiRRJjEzODkzRidGMUY0LUZNNiVGTy1GLjYkUSMxNkYnRjFGZW5GMUZobi1GIzYmLUYuNiRRJjk0NTIwRidGMUY0LUZNNiVGTy1GLjYkUSMxNEYnRjFGZW5GMUZobi1GIzYmLUYuNiRRJzI4NjU3MEYnRjFGNC1GTTYlRk8tRi42JFEjMTJGJ0YxRmVuRjFGaG4tRiM2Ji1GLjYkUSc0MDkxMTZGJ0YxRjQtRk02JUZPLUYuNiRRIzEwRidGMUZlbkYxRmhuLUYjNiZGXnFGNC1GTTYlRk8tRi42JFEiOEYnRjFGZW5GMUZobi1GIzYmRmRwRjQtRk02JUZPLUYuNiRRIjZGJ0YxRmVuRjFGaG4tRiM2JkZqb0Y0LUZNNiVGTy1GLjYkUSI0RidGMUZlbkYxRmhuLUYjNiZGYG9GNC1GTTYlRk8tRi42JFEiMkYnRjFGZW5GMUZobkYtRjE=">LDgqJiIjPCIiIilJInhHNiIiIz9GJUYlKiYiJE0nRiUpRiciIz1GJUYlKiYiJiQqUSJGJSlGJyIjO0YlRiUqJiImP1gqRiUpRiciIzlGJUYlKiYiJ3FsR0YlKUYnIiM3RiVGJSomIic7IjQlRiUpRiciIzVGJUYlKiZGN0YlKUYnIiIpRiVGJSomRjNGJSlGJyIiJ0YlRiUqJkYvRiUpRiciIiVGJUYlKiZGK0YlKUYnIiIjRiVGJUYkRiU=</Equation></Text-field>
</Output>
<Output>
<Text-field style="2D Output" layout="Maple Output"><Equation executable="false" style="2D Output" display="LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzY4LUYjNiYtSSNtbkdGJDYkUSMxN0YnLyUsbWF0aHZhcmlhbnRHUSdub3JtYWxGJy1JI21vR0YkNi1RMSZJbnZpc2libGVUaW1lcztGJ0YxLyUmZmVuY2VHUSZmYWxzZUYnLyUqc2VwYXJhdG9yR0Y6LyUpc3RyZXRjaHlHRjovJSpzeW1tZXRyaWNHRjovJShsYXJnZW9wR0Y6LyUubW92YWJsZWxpbWl0c0dGOi8lJ2FjY2VudEdGOi8lJ2xzcGFjZUdRJjAuMGVtRicvJSdyc3BhY2VHRkktSSVtc3VwR0YkNiUtSSNtaUdGJDYlUSJ4RicvJSdpdGFsaWNHUSV0cnVlRicvRjJRJ2l0YWxpY0YnLUYuNiRRIzIwRidGMS8lMXN1cGVyc2NyaXB0c2hpZnRHUSIwRidGMS1GNTYtUSIrRidGMUY4RjtGPUY/RkFGQ0ZFL0ZIUSwwLjIyMjIyMjJlbUYnL0ZLRlxvLUYjNiYtRi42JFEkNjM0RidGMUY0LUZNNiVGTy1GLjYkUSMxOEYnRjFGZW5GMUZobi1GIzYmLUYuNiRRJjEzODkzRidGMUY0LUZNNiVGTy1GLjYkUSMxNkYnRjFGZW5GMUZobi1GIzYmLUYuNiRRJjk0NTIwRidGMUY0LUZNNiVGTy1GLjYkUSMxNEYnRjFGZW5GMUZobi1GIzYmLUYuNiRRJzI4NjU3MEYnRjFGNC1GTTYlRk8tRi42JFEjMTJGJ0YxRmVuRjFGaG4tRiM2Ji1GLjYkUSc0MDkxMTZGJ0YxRjQtRk02JUZPLUYuNiRRIzEwRidGMUZlbkYxRmhuLUYjNiZGXnFGNC1GTTYlRk8tRi42JFEiOEYnRjFGZW5GMUZobi1GIzYmRmRwRjQtRk02JUZPLUYuNiRRIjZGJ0YxRmVuRjFGaG4tRiM2JkZqb0Y0LUZNNiVGTy1GLjYkUSI0RidGMUZlbkYxRmhuLUYjNiZGYG9GNC1GTTYlRk8tRi42JFEiMkYnRjFGZW5GMUZobkYtRjE=">LDgqJiIjPCIiIilJInhHNiIiIz9GJUYlKiYiJE0nRiUpRiciIz1GJUYlKiYiJiQqUSJGJSlGJyIjO0YlRiUqJiImP1gqRiUpRiciIzlGJUYlKiYiJ3FsR0YlKUYnIiM3RiVGJSomIic7IjQlRiUpRiciIzVGJUYlKiZGN0YlKUYnIiIpRiVGJSomRjNGJSlGJyIiJ0YlRiUqJkYvRiUpRiciIiVGJUYlKiZGK0YlKUYnIiIjRiVGJUYkRiU=</Equation></Text-field>
</Output>
</Group>
<Group view="code" labelreference="L805" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"># All the polynomials R(x) found are irreducible
nops(remove(irreduc,allPols));</Text-field>
</Input>
</Group>
<Group view="code" labelreference="L868" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
</Input>
</Group>
<Group view="code" labelreference="L804" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"># The maximum degree is 72
max(map(degree,allPols));</Text-field>
</Input>
<Output>
<Text-field style="2D Output" layout="Maple Output"><Equation executable="false" style="2D Output">IiNz</Equation></Text-field>
</Output>
</Group>
<Group view="code" labelreference="L806" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">k := 'k':
# It is sufficient to compare the R(x)'s to the first 400 cyclotomic polys
# The following is a lower bound on the degrees of cyclotomic polynomials
ceil(subs(k=349,k/(exp(gamma)*log(log(k))+3/log(log(k)))));
</Text-field>
</Input>
<Output>
<Text-field style="2D Output" layout="Maple Output"><Equation executable="false" style="2D Output">IiN0</Equation></Text-field>
</Output>
</Group></Presentation-Block><Presentation-Block>
<Group labelreference="L548" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">with(numtheory):
CPs := [0,seq(cyclotomic(k,x),k=1..500)]:</Text-field>
</Input>
</Group></Presentation-Block><Presentation-Block>
<Group labelreference="L568" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
</Input>
</Group>
<Group labelreference="L569" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">ratIndex := {}:
for k from 1 to nops(allPols) do
  if allPols[k] in CPs then ratIndex := ratIndex union {k}: fi:
od:</Text-field>
</Input>
</Group></Presentation-Block><Presentation-Block>
<Group labelreference="L84" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
</Input>
</Group>
<Group labelreference="L817" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">ratExp := map(a-&gt;models[a],ratIndex):</Text-field>
</Input>
</Group>
<Group labelreference="L832" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">nops(ratExp);</Text-field>
</Input>
<Output>
<Text-field style="2D Output" layout="Maple Output"><Equation executable="false" style="2D Output">IiNI</Equation></Text-field>
</Output>
</Group>
<Group labelreference="L837" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"># lcm of denominators is 30 -- use this to get exact fractions
for k in ratExp do
<Font encoding="UTF-8">  printf(&quot;%a, %a\134n&quot;,k,round(30*minPs(k)[5])/30);
</Font>od:</Text-field>
</Input>
<Output>
<Text-field style="Line Printed Output" layout="Line Printed Output">[[-2, -1], [1, -1], [1, 1]], -7/3</Text-field>
<Text-field style="Line Printed Output" layout="Line Printed Output">[[-2, -1], [1, 0], [1, 1]], -11/5
[[-2, 1], [0, 1], [1, -2]], -5
[[-2, 1], [1, -2], [1, 1]], -4
[[-2, 1], [1, -1], [1, 0]], -7
[[-2, 1], [1, -1], [1, 1]], -5</Text-field>
<Text-field style="Line Printed Output" layout="Line Printed Output">[[-2, -2], [-2, 0], [1, 0], [1, 1]], -7/3
[[-2, -1], [-2, 0], [1, 0], [1, 1]], -7/3
[[-2, -1], [-1, -2], [0, 1], [1, 0]], -5/2
[[-2, -1], [-1, -1], [0, -1], [1, 1]], -11/5
[[-2, -1], [-1, 0], [0, 1], [1, 0]], -5/2
[[-2, -1], [-1, 1], [0, -1], [1, 1]], -5/2</Text-field>
<Text-field style="Line Printed Output" layout="Line Printed Output">[[-2, 0], [-2, 1], [1, -1], [1, 0]], -5
[[-2, 0], [-1, -1], [0, -2], [1, 1]], -5/2
[[-2, 1], [-1, -1], [0, 1], [1, -1]], -4
[[-2, 1], [-1, 0], [0, -1], [1, 0]], -4
[[-2, 1], [-1, 1], [0, 1], [1, -1]], -7</Text-field>
<Text-field style="Line Printed Output" layout="Line Printed Output">[[-2, -1], [-1, -2], [-1, -1], [0, 1], [1, 0]], -5/2
[[-2, -1], [-1, 0], [-1, 1], [0, -1], [1, 1]], -5/2
[[-2, 1], [-1, -1], [-1, 0], [0, 1], [1, -1]], -4</Text-field>
<Text-field style="Line Printed Output" layout="Line Printed Output">[[-2, -2], [-2, 0], [-1, -1], [-1, 0], [1, 0], [1, 1]], -7/3
[[-2, -1], [-1, -1], [0, -1], [0, 1], [1, -1], [1, 1]], -5/2</Text-field>
<Text-field style="Line Printed Output" layout="Line Printed Output">[[-2, -1], [-1, 1], [0, 1], [1, -2], [1, 0], [1, 1]], -3
[[-2, 0], [-1, -1], [-1, 0], [0, -2], [0, -1], [1, 1]], -5/2
[[-2, 1], [-1, 0], [0, -1], [0, 1], [1, -2], [1, 0]], -4</Text-field>
<Text-field style="Line Printed Output" layout="Line Printed Output">[[-2, 1], [-1, 0], [0, 1], [1, -2], [1, -1], [1, 1]], -4
[[-2, 1], [-1, 1], [0, -1], [0, 1], [1, -1], [1, 1]], -4
[[-2, -1], [-2, 0], [-1, -2], [-1, -1], [0, -2], [0, 1], [1, 0], [1, 1]], -5/2</Text-field>
<Text-field style="Line Printed Output" layout="Line Printed Output">[[-2, 1], [-1, 0], [-1, 1], [0, -1], [0, 1], [1, -2], [1, -1], [1, 0], [1, 1]], -4</Text-field>
</Output>
</Group>
<Group view="code" labelreference="L860" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"># Go backwards to verify that the calculation is correct (independently verify c)

for ST in ratExp do
alp := round(30*minPs(ST)[5])/30;
chi := add(x^j[1]*y^j[2],j=ST);
cc := -simplify(cos(-Pi/(alp+1)));

pts := simplify(op(select(a-&gt;evalf(subs(a,x)&gt;0) and evalf(subs(a,y)&gt;0), map(allvalues,[(solve([diff(chi,x),diff(chi,y)]))]))));
evalf(subs(pts,diff(chi,x,y) / sqrt(diff(chi,x,x)*diff(chi,y,y)))-cc);
printf(&quot;%a, &quot;,%);
od:</Text-field>
</Input>
<Output>
<Text-field style="Line Printed Output" layout="Line Printed Output">0., 0., -.1e-79, 0., 0., -.1e-79, .1e-79, .1e-79, -.2e-79, 0., -.1e-79, -.1e-79, -.1e-79, -.1e-79, .2e-79, .2e-79, 0., -.1e-79, -.64615e-75, .3e-79, .2e-79, 0., 0., 0., .1e-79, 0., 0., -.1e-79, 0., </Text-field>
</Output>
</Group>
<Group labelreference="L855" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
</Input>
</Group>
<Group labelreference="L863" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
</Input>
</Group>
<Group labelreference="L864" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
</Input>
</Group>
<Group labelreference="L869" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
</Input>
</Group></Presentation-Block><Presentation-Block>
<Group view="presentation" hide-input="false" hide-output="true" inline-output="false" labelreference="L53" drawlabel="true">
<Input>
<Text-field style="Text" layout="Normal"><Equation executable="false" style="2D Math" input-equation="" display="LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYkLUkjbWlHRiQ2I1EhRicvJSxtYXRodmFyaWFudEdRJ25vcm1hbEYn">LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYkLUkjbWlHRiQ2I1EhRicvJSxtYXRodmFyaWFudEdRJ25vcm1hbEYn</Equation></Text-field>
</Input>
</Group></Presentation-Block>
</Worksheet>